<template>
    <el-button type="primary" style="margin-left: 500px;">{{form1.fatherHorn}}</el-button>
    <el-button type="primary" style="margin-left: 100px;">{{form1.femaleHorn}}</el-button>
    <br><br><br><br><br><br>
    <el-button type="success" style="margin-left: 580px;">{{form1.earNumber}}</el-button>
</template>
  <script setup lang="ts">
  import axios from "axios";
  import {reactive,ref,onMounted} from "vue"
  import Cookies from 'cookies-ts'
  const cookie = new Cookies();
  //表单
  const form1=reactive({
    "id": 0,
    "visualEarSignal": "",
    "electronicEarNumber": "",
    "breed": 0,
    "sex": 0,
    "birthday": "",
    "ageDays": "",
    "ageMoon": "",
    "presence": 0,
    "growthStage": "",
    "sheepType": "",
    "cottage": "",
    "field": "",
    "reproductiveState": 0,
    "pregnancyTest": true,
    "statusDays": "",
    "productionGrade": 0,
    "salesGrade": 0,
    "geneClass": 0,
    "birthWeight": "",
    "weaningWeight": "",
    "weaningDate": "",
    "weaningAge": "",
    "fatherHorn": "",
    "femaleHorn": "",
    "earNumber": "",
    "placeBirth": "",
    "remark": "",
    "createBy": "",
    "createDate": "",
    "updateBy": "",
    "updateDate": "",
  })
  const Find=()=>{
    axios.get("MYroute/api/SheepFile/SheepFileConditionFinds?card="+cookie.get("earNumber")).then(res=>{
      form1.id=res.data.id;
      form1.ageDays=res.data.ageDays;
      form1.ageMoon=res.data.ageMoon;
      form1.birthWeight=res.data.birthWeight;
      form1.birthday=res.data.birthday;
      form1.breed=res.data.breed;
      form1.cottage=res.data.cottage;
      form1.createBy=res.data.createBy;
      form1.createDate=res.data.createDate;
      form1.earNumber=res.data.earNumber;
      form1.electronicEarNumber=res.data.electronicEarNumber;
      form1.fatherHorn=res.data.fatherHorn;
      form1.femaleHorn=res.data.femaleHorn;
      form1.field=res.data.field;
      form1.geneClass=res.data.geneClass;
      form1.growthStage=res.data.growthStage;
      form1.id=res.data.id;
      form1.placeBirth=res.data.placeBirth;
      form1.pregnancyTest=res.data.pregnancyTest;
      form1.presence=res.data.presence;
      form1.productionGrade=res.data.productionGrade;
      form1.remark=res.data.remark;
      form1.sex=res.data.sex;
      form1.sheepType=res.data.sheepType;
      form1.statusDays=res.data.statusDays;
      form1.updateBy=res.data.updateBy;
      form1.updateDate=res.data.updateDate;
      form1.visualEarSignal=res.data.visualEarSignal;
      form1.weaningAge=res.data.weaningAge;
      form1.weaningDate=res.data.weaningDate;
      form1.weaningWeight=res.data.weaningWeight;
      form1.reproductiveState=res.data.reproductiveState;
      form1.salesGrade=res.data.salesGrade;
    })
  }
  
  onMounted(()=>{
    Find()
  })
  
  </script>
  <style></style>